﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace XWsdl
{
    public partial class frmParameters : Form
    {

        public string InputOptions
        {
            get 
            {
                return this.txtInputOptions.Text;
            }
        }

        public string OutputOptions
        {
            get
            {
                return this.txtOutputOptions.Text;
            }
        }

        public string LanguageOptions
        {
            get
            {
                return this.cboLanguageOptions.Text;
            }
        }

        public string[] NamespaceOptions
        {
            get
            {
                return this.txtNamespaceOptions.Lines;
            }
        }

        public bool EnableDataBindingOptions
        {
            get
            {
                return this.chkEnableDataBindingOptions.Checked;
            }
        }

        public bool OldAsyncOptions
        {
            get
            {
                return this.chkOldAsyncOptions.Checked;
            }
        }

        public string DataSetNamespace
        {
            get
            {
                return this.txtlblDataSetNameSpace.Text;
            }
        }

        public bool UseDefaultCriteraForDataSetNamespace
        {
            get
            {
                return this.chkUseDefaultCriteria.Checked;
            }
        }

        public bool ExcludeArrayList
        {
            get
            {
                return this.chkArrayList.Checked;
            }
        }

        public frmParameters()
        {
            InitializeComponent();
        }

        private bool IsValidForm()
        {
            bool ret = true;

            return ret;
        }
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            if (this.IsValidForm())
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
            }   
        }

        private void btnInputOptions_Click(object sender, EventArgs e)
        {
            ofd.FileName = string.Empty;
            this.ofd.ShowDialog();
            if (ofd.FileName != string.Empty) {
                this.txtInputOptions.Text = ofd.FileName;
            }
        }

        private void btnOutputOptions_Click(object sender, EventArgs e)
        {
            sfd.FileName = string.Empty;
            this.sfd.ShowDialog();
            if (sfd.FileName != string.Empty)
            {
                this.txtOutputOptions.Text = sfd.FileName;
            }
        }
    }
}
